/*
 * @file	sensor_icm42670.h
 * @autohr  Queclink Harvey.huang
 * @date	2024年12月18日
 * @brief
 *
 * Coypright (C) 2024 Queclink Co., Ltd. All Rights Reserved
 *
 * @attention
 *
 * @usage
 *
 * @record
 *
 */

#ifndef __SENSOR_ICM42670_H__
#define __SENSOR_ICM42670_H__


/* ICM42670精度为16it最大数值为32768(正负) */
#define ICM42670_MAX_ACCEL_VALUE    32768

/* ICM42670初始化失败重复次数 */
#define INIT_MAX_COUNT              6


extern int icm42670_accel_range_set(int nRange);
extern int icm42670_odr_set(int frequency); //frequency  100, 200, 400;
extern int icm42670_accel_sensitivity_set(int sense_value);
extern int icm42670_sensor_initialize(void);
extern int icm42670_sensor_lowpower_initialize(void);
extern int icm42670_sensor_chip_id_get(void *id);
extern float icm42670_sensor_temperature_get(void);
extern int icm42670_sensor_accel_frame_get(void *accel);
extern unsigned int icm42670_sensor_max_accel_value(void);
extern int icm42670_sensor_gyro_frame_get(void *gyro);
extern void clear_wom_int_flags(void);

#endif

